/*
 * @Author: '浪川' '1214391613@qq.com'
 * @Date: 2025-07-14 14:17:49
 * @LastEditors: '浪川' '1214391613@qq.com'
 * @LastEditTime: 2025-07-17 17:41:54
 * @FilePath: \passiflora-edulis-sims\src\stores\global-text-store.ts
 * @Description: 全局文字设置 在其他文字或者边框没有设置的时候 就会用这里的设置
 *
 * Copyright (c) 2025 by '1214391613@qq.com', All Rights Reserved.
 */
import { defineStore, acceptHMRUpdate } from 'pinia'
import type { IText } from 'src/interfaces/IBook'

export const useGlobalTextStore = defineStore('GlobalText', {
  state: (): IText => ({
    text: '',
    font: {
      font_name: '',
      font_size: 25,
      font_color: '#000000',
    },
    text_align: 'center',
    vertical_align: 'middle',
    offet_x: 0,
    offet_y: 0,
  }),

  getters: {},

  actions: {},
})

if (import.meta.hot) {
  import.meta.hot.accept(acceptHMRUpdate(useGlobalTextStore, import.meta.hot))
}
